<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>静待花开</title><meta name="author" content="brad 随风起舞"><meta name="copyright" content="brad 随风起舞"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="有些事情需要一辈子的沉淀">
<meta property="og:type" content="website">
<meta property="og:title" content="静待花开">
<meta property="og:url" content="https://zhangbo4881820.gitee.io/myblog/page/5/index.html">
<meta property="og:site_name" content="静待花开">
<meta property="og:description" content="有些事情需要一辈子的沉淀">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png">
<meta property="article:author" content="brad 随风起舞">
<meta property="article:tag" content="java,编程,生活">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png"><link rel="shortcut icon" href="/myblog/img/favicon.png"><link rel="canonical" href="https://zhangbo4881820.gitee.io/myblog/page/5/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/myblog/css/index.css"><link rel="stylesheet" href="/myblog/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="/myblog/css/fancybox.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
  root: '/myblog/',
  algolia: undefined,
  localSearch: {"path":"/myblog/search.xml","preload":false,"top_n_per_article":1,"unescape":false,"languages":{"hits_empty":"找不到您查询的内容：${query}","hits_stats":"共找到 ${hits} 篇文章"}},
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  dateSuffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: false,
  },
  autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '静待花开',
  isPost: false,
  isHome: true,
  isHighlightShrink: true,
  isToc: false,
  postUpdate: '2023-09-15 15:58:17'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
    win.getCSS = (url,id = false) => new Promise((resolve, reject) => {
      const link = document.createElement('link')
      link.rel = 'stylesheet'
      link.href = url
      if (id) link.id = id
      link.onerror = reject
      link.onload = link.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        link.onload = link.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(link)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 7.0.0-rc2"><link rel="alternate" href="/myblog/atom.xml" title="静待花开" type="application/atom+xml">
</head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/myblog/archives/"><div class="headline">文章</div><div class="length-num">57</div></a><a href="/myblog/tags/"><div class="headline">标签</div><div class="length-num">20</div></a><a href="/myblog/categories/"><div class="headline">分类</div><div class="length-num">25</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/myblog/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/myblog/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/myblog/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/myblog/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 分享</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/myblog/Gallery/"><i class="fa-fw fas fa-images"></i><span> 照片</span></a></li><li><a class="site-page child" href="/myblog/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li><li><a class="site-page child" href="/myblog/movies/"><i class="fa-fw fas fa-video"></i><span> 视频</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/myblog/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/myblog/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="not-top-img" id="page-header"><nav id="nav"><span id="blog-info"><a href="/myblog/" title="静待花开"><span class="site-name">静待花开</span></a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search" href="javascript:void(0);"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/myblog/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/myblog/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/myblog/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/myblog/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 分享</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/myblog/Gallery/"><i class="fa-fw fas fa-images"></i><span> 照片</span></a></li><li><a class="site-page child" href="/myblog/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li><li><a class="site-page child" href="/myblog/movies/"><i class="fa-fw fas fa-video"></i><span> 视频</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/myblog/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/myblog/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/12008/" title="全栈开发(AngularJS)">全栈开发(AngularJS)</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-11-05T02:58:05.000Z" title="发表于 2019-11-05 10:58:05">2019-11-05</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/%E5%AE%9E%E6%88%98/">实战</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/%E5%AE%9E%E6%88%98/">实战</a></span></div><div class="content">在这篇博客中,将展示Spring Boot，Spring Security和AngularJS如何协同工作以提供愉悦和安全的用户体验。通过使用AngularJS来安全的消费RESTful服务。首先，您将通过在AngularJS中发送每个请求的授权标头开始。然后，您将创建一个登录页面并更新Spring Security配置以支持登录和注销身份验证过程。
在Angular Js中发送的每个访问都带着授权头Basic Authentication 允许客户端发送Base-64编码的凭据,通过在每个http访问中使用授权的header.这意味着每个访问都是独立的,并且服务器不会对客户端维护任何状态信息.
当你发送一个带授权头的请求时,让一个 HTTP 拦截器来处理比在$http方法中人工指定授权头要好很多.
在Angular Js 中添加拦截器当一个请求和响应在基于HTTP中交互时,此时你想要注入一些自定义的逻辑,然后就是HTTP拦截器出手时机.一个http拦截器总是为了如认证,授权,管理session状态,记录日志,修改响应,重写url,处理错误,缓存,添加自定义头,在请求响应中添加时间戳, ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/62645/" title="Springboot热加载">Springboot热加载</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-11-05T02:44:00.000Z" title="发表于 2019-11-05 10:44:00">2019-11-05</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/%E5%B0%8F%E6%93%8D%E4%BD%9C/">小操作</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/springBoot/">springBoot</a></span></div><div class="content">引包&lt;!--热加载--&gt;    &lt;dependency&gt;        &lt;groupId&gt;org.springframework&lt;/groupId&gt;        &lt;artifactId&gt;springloaded&lt;/artifactId&gt;        &lt;version&gt;1.2.6.RELEASE&lt;/version&gt;        &lt;scope&gt;runtime&lt;/scope&gt;        &lt;optional&gt;true&lt;/optional&gt;    &lt;/dependency&gt;    &lt;dependency&gt;        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;        &lt;artifactId&gt;spring-boot-devtools&lt;/artifactId&gt;        &lt;scope&gt;runtime&lt;/ ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/20230/" title="全栈开发(Spring Security)">全栈开发(Spring Security)</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-11-04T02:32:02.000Z" title="发表于 2019-11-04 10:32:02">2019-11-04</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/%E5%AE%9E%E6%88%98/">实战</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/%E5%AE%9E%E6%88%98/">实战</a></span></div><div class="content">在这篇博文中,你将了解保护REST API，以便只有经过身份验证和授权的用户才能调用REST API并执行不同的CRUD操作。您将使用Spring Security来保护RESTful服务。首先，我将介绍Spring Security并解释所需的Maven依赖关系。然后，您将学习如何实现Spring Security来保护UserRegistrationSystem应用程序中的REST API。您还将了解有关内存和数据库配置的信息，以设置用户凭据及其角色。
Spring Security 的介绍Security是一种保护资源免遭未经身份验证和未经授权的用户访问,并允许特定(经过身份验证和授权的)用户访问这些受保护资源的过程.安全性不同于防火墙，入侵检测，JVM安全性或其他任何方面。Spring Security主要针对基于Spring的应用程序
Spring Security框架最初是Acegi Security框架，后来被Spring用作子项目。它已成为保护使用Spring Framework开发的应用程序的事实上的标准。Spring Security在HTTP请求方法的调用级别支持 ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/45226/" title="全栈开发(AngularJS原理)">全栈开发(AngularJS原理)</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-11-01T06:35:19.000Z" title="发表于 2019-11-01 14:35:19">2019-11-01</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/%E5%AE%9E%E6%88%98/">实战</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/%E5%AE%9E%E6%88%98/">实战</a></span></div><div class="content">AngularJs的基本组件AngularJs允许开发者去建立一种健状的,易维护的基于MVC模型的应用结构。在实现AngularJs之前熟悉一下他的各种组件是非常重要的。

Module: 这是AngularJs的组件之一，一个Module是一个包含服务(services),控制层(controllers),过滤器(filter), 指令(directives),等等。在AngularJs中每个Module都有自己的文件结构用于控制器或者指令等。 AngularJS中的每个视图页面都有一个模块。

Scope: AngularJS中的作用域只是用于填充网页视图的数据的JavaScript表示。 该数据可以来自任何来源，例如数据库或远程Web服务器。

view: AngularJS中带有模板和指令的视图是AngularJS的其他组件，用于构建呈现给用户的HTML视图。

Expression: 在HTML模板中添加表达式的功能是AngularJS的一项重要功能。表达式基本上与作用域链接。表达式有助于将应用程序数据绑定到HTML

Controller: 控制器是MVC框架的组件。控制器 ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/42642/" title="玩转JAVA正则2">玩转JAVA正则2</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-10-31T01:46:05.000Z" title="发表于 2019-10-31 09:46:05">2019-10-31</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/%E6%AD%A3%E5%88%99/">正则</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/reg/">reg</a></span></div><div class="content">java 正则类在Java中，当我们处理复杂的项目时，会遇到许多输入，这些输入通常需要代码才能使文本与模式相等。 正是在电子邮件标头验证，文本搜索以及根据常规文本创建自定义文本等中经常使用此功能。
Java String 方法在进入java.util.regex包之前，让我们看一下java String类提供的一些使用正则表达式的方法。 这些方法可用于较少的简单验证。 但是，如果我们要经常使用正则表达式，那么这些方法将带来性能开销

matches() 方法 sampleString.matches（“ regex”）返回true或false取决于正则表达式是否可以完全匹配字符串。 要记住的重要一点是，String.matches（）仅在可以匹配整个字符串时才返回true。
 	public class DemoForStringMatches &#123;    public static void main(String[] args) &#123;        // 定义一个匹配模式                                    String regex ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/21435/" title="玩转JAVA正则">玩转JAVA正则</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-10-30T01:57:13.000Z" title="发表于 2019-10-30 09:57:13">2019-10-30</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/%E6%AD%A3%E5%88%99/">正则</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/reg/">reg</a></span></div><div class="content">上来一个例子这里不讲来历，用途，好处,直接就是怎么用！先看个邮箱验证的例子：
String input =&quot;^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]&#123;2,&#125;)$&quot;;String emailAddress =&quot;xyz@abc-.com&quot;;Pattern p = Pattern.compile(input);Matcher m = p.matcher(emailAddress);System.out.println (&quot;The email 1 matches:&quot;+ m.matches());	//true
常用正则符号
直接字符串  例如：  Pattern.matches(&quot;test&quot;,&quot;test&quot;); 很下显然要匹配的话reg和要验证的字符串相等才行
字符类  例如：  [Tt]est 这里[]里的就是字符类，意思就是Test和test都匹配，[ ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/7504/" title="解决git有些文件不能上传">解决git有些文件不能上传</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-10-25T01:58:46.000Z" title="发表于 2019-10-25 09:58:46">2019-10-25</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/git/">git</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86%E5%B7%A5%E5%85%B7/">项目管理工具</a></span></div><div class="content">问题描述当一个文件结构中存在多个.git目录,那么其余的带.git的目录的文件是没办法上传的，或者是在.ignore文件里指定了忽视上传的.
解决方法
删除掉多余的.git目录
使用git命令清除刚删掉.git目录的目录的缓存。 git rm --cache themes/hexo
git add themes/archer
git commit -m &quot;update&quot;
git push

</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/56046/" title="python之Django搭建web(1)">python之Django搭建web(1)</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-10-24T16:10:38.000Z" title="发表于 2019-10-25 00:10:38">2019-10-25</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/pythonWeb/">pythonWeb</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/python/">python</a></span></div><div class="content">这里我直接进入主题，前提是已经安装了python
安装Virtualenv命令安装：pip install virtualenv重点强调一下安装这个虚拟环境不是必须的。但是有他的好处，如下所示：

我们安装的任何东西包括django在内，都会被安装在虚拟环境中
每个项目都会在一个虚拟环境中，这就像是每个django项目都有一个沙盒。你想怎么玩就怎么玩，不会破坏虚拟环境之外的东西。


接下来创建一个指定文件夹mkdir myprojectcd myproject

然后使用命令在这个文件夹创建虚拟环境  virtualenv venv    我们的虚拟环境就被创建了，要使用它，还需激活一下。使用命令  venv\Scripts\activate  你就可以看到（venv）在命令行前，就像下图    顺便提下，关闭虚拟环境的命令是  venv\Scripts\deactivate.bat

安装Django特别提下因为我们是中国，天然下载国外的东西慢，至于原因不需要解释，下面是解决方法
提升pip 安装速度
换个数据源，比如用豆瓣的(临时使用)：  pip install -i http ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/64938/" title="git配置多平台SSH">git配置多平台SSH</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-10-21T02:36:15.000Z" title="发表于 2019-10-21 10:36:15">2019-10-21</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/git/">git</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86%E5%B7%A5%E5%85%B7/">项目管理工具</a></span></div><div class="content">生成github的SSH
 ssh-keygen -t rsa -C “注册的邮箱号码” 

由于咱们配置多个SSH所以将文件名设置下。第一个回车之后第二个回车之前：输入文件名，例如：
 my-github.后面一路回车就行，除非你还想设置个手动输入的密码。

然后命令cd ~/.ssh 进入该文件。产生了对应私匙，和公匙。

打命令ssh-add my-github。将私匙加入系统。如果出现Could not open a connection to your authentication agent. 那么执行命令eval &#39;ssh-agent -s&#39;,之后接着ssh-add my-github

这一步完事之后执行命令cat ~/.ssh/my-github.pub，然后复制公匙，添加到GitHub中。

最后一步测试连通没有。执行命令ssh-T git@github.com


配置多SSH的配置文件
在~/.ssh目录中使用命令创建一个config文件：touch config 

命令vi config编辑配置。如下图



生成coding的SSH基本和上 ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/myblog/posts/12263/" title="MD数学公式语法">MD数学公式语法</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-10-17T09:55:50.000Z" title="发表于 2019-10-17 17:55:50">2019-10-17</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myblog/categories/markDown/">markDown</a></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/myblog/tags/markDown/">markDown</a></span></div><div class="content">行内与独行
行内公式: 将公式插入到本行内，符号: $公式内容$
独行公式: 将公式插入到新的一行内，并且居中，符号:$$公式内容$$

上标、下标与组合
上标符号，符号：^，如：$x^4$
下标符号，符号：_，如：$x_1$
组合符号，符号：&#123;&#125;，如：${16}{8}O{2+}{2}$

汉字、字体与格式
汉字形式，符号：\mbox&#123;&#125;，如： $V_{\mbox{初始}}$
字体控制，符号：\displaystyle，如：$\displaystyle \frac{x+y}{y+z}$
下划线符号，符号：\underline，如：$\underline{x+y}$
标签，符号\tag{数字}，如：$\tag{11}$
上大括号，符号：\overbrace&#123;算式&#125;，如：$\overbrace{a+b+c+d}^{2.0}$
下大括号，符号：\underbrace&#123;算式&#125;，如：$a+\underbrace{b+c}_{1.0}+d$
上位符号，符号：\stacrel&#123;上位符号&#125;&#123;基 ...</div></div></div><nav id="pagination"><div class="pagination"><a class="extend prev" rel="prev" href="/myblog/page/4/#content-inner"><i class="fas fa-chevron-left fa-fw"></i></a><a class="page-number" href="/myblog/">1</a><span class="space">&hellip;</span><a class="page-number" href="/myblog/page/4/#content-inner">4</a><span class="page-number current">5</span><a class="page-number" href="/myblog/page/6/#content-inner">6</a><a class="extend next" rel="next" href="/myblog/page/6/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" onerror="this.onerror=null;this.src='/myblog/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">brad 随风起舞</div><div class="author-info__description">有些事情需要一辈子的沉淀</div></div><div class="card-info-data site-data is-center"><a href="/myblog/archives/"><div class="headline">文章</div><div class="length-num">57</div></a><a href="/myblog/tags/"><div class="headline">标签</div><div class="length-num">20</div></a><a href="/myblog/categories/"><div class="headline">分类</div><div class="length-num">25</div></a></div><a id="card-info-btn" href="https://github.com/xxxxxx"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/xxxxx" target="_blank" title="Github"><i class="fab fa-github" style="color: #24292e;"></i></a><a class="social-icon" href="mailto:xxxxxx@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope" style="color: #4a7dbe;"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">This is my Blog</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/myblog/posts/15695/" title="jenkins（1）">jenkins（1）</a><time datetime="2023-09-14T02:17:44.000Z" title="发表于 2023-09-14 10:17:44">2023-09-14</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/myblog/posts/22012/" title="wsl的Ubuntu子系统（1）">wsl的Ubuntu子系统（1）</a><time datetime="2023-09-13T08:42:19.000Z" title="发表于 2023-09-13 16:42:19">2023-09-13</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/myblog/posts/30302/" title="effective-java-(接口优于抽象类)">effective-java-(接口优于抽象类)</a><time datetime="2023-09-12T08:12:48.000Z" title="发表于 2023-09-12 16:12:48">2023-09-12</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/myblog/posts/9473/" title="effective-java(创建和销毁对象--组合的形式优于继承)">effective-java(创建和销毁对象--组合的形式优于继承)</a><time datetime="2023-09-11T08:23:19.000Z" title="发表于 2023-09-11 16:23:19">2023-09-11</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/myblog/posts/16107/" title="Hello World">Hello World</a><time datetime="2023-09-07T09:44:01.910Z" title="发表于 2023-09-07 17:44:01">2023-09-07</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
            <i class="fas fa-folder-open"></i>
            <span>分类</span>
            <a class="card-more-btn" href="/myblog/categories/" title="查看更多">
    <i class="fas fa-angle-right"></i></a>
            </div>
            <ul class="card-category-list" id="aside-cat-list">
            <li class="card-category-list-item "><a class="card-category-list-link" href="/myblog/categories/CSS/"><span class="card-category-list-name">CSS</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myblog/categories/Docker/"><span class="card-category-list-name">Docker</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myblog/categories/HTML/"><span class="card-category-list-name">HTML</span><span class="card-category-list-count">4</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myblog/categories/JQuery/"><span class="card-category-list-name">JQuery</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myblog/categories/RabbitMQ/"><span class="card-category-list-name">RabbitMQ</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myblog/categories/docker/"><span class="card-category-list-name">docker</span><span class="card-category-list-count">3</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myblog/categories/git/"><span class="card-category-list-name">git</span><span class="card-category-list-count">4</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myblog/categories/java/"><span class="card-category-list-name">java</span><span class="card-category-list-count">5</span></a></li>
            </ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/myblog/tags/%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86%E5%B7%A5%E5%85%B7/" style="font-size: 1.3em; color: #99a1ac">项目管理工具</a> <a href="/myblog/tags/%E5%85%AC%E8%80%83/" style="font-size: 1.1em; color: #999">公考</a> <a href="/myblog/tags/%E6%9D%82%E8%B0%88/" style="font-size: 1.1em; color: #999">杂谈</a> <a href="/myblog/tags/Docker/" style="font-size: 1.1em; color: #999">Docker</a> <a href="/myblog/tags/%E6%B6%88%E6%81%AF%E4%B8%AD%E9%97%B4%E4%BB%B6/" style="font-size: 1.2em; color: #999da3">消息中间件</a> <a href="/myblog/tags/springCloud/" style="font-size: 1.2em; color: #999da3">springCloud</a> <a href="/myblog/tags/%E5%AE%B9%E5%99%A8/" style="font-size: 1.2em; color: #999da3">容器</a> <a href="/myblog/tags/jenkins/" style="font-size: 1.1em; color: #999">jenkins</a> <a href="/myblog/tags/mysql/" style="font-size: 1.3em; color: #99a1ac">mysql</a> <a href="/myblog/tags/%E5%B0%8F%E6%93%8D%E4%BD%9C/" style="font-size: 1.3em; color: #99a1ac">小操作</a> <a href="/myblog/tags/java/" style="font-size: 1.5em; color: #99a9bf">java</a> <a href="/myblog/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80/" style="font-size: 1.5em; color: #99a9bf">计算机基础</a> <a href="/myblog/tags/%E5%AE%9E%E6%88%98/" style="font-size: 1.4em; color: #99a5b6">实战</a> <a href="/myblog/tags/HTML/" style="font-size: 1.3em; color: #99a1ac">HTML</a> <a href="/myblog/tags/reg/" style="font-size: 1.2em; color: #999da3">reg</a> <a href="/myblog/tags/%E5%89%8D%E7%AB%AF%E7%9F%A5%E8%AF%86/" style="font-size: 1.2em; color: #999da3">前端知识</a> <a href="/myblog/tags/markDown/" style="font-size: 1.2em; color: #999da3">markDown</a> <a href="/myblog/tags/python/" style="font-size: 1.1em; color: #999">python</a> <a href="/myblog/tags/linux/" style="font-size: 1.1em; color: #999">linux</a> <a href="/myblog/tags/springBoot/" style="font-size: 1.2em; color: #999da3">springBoot</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/myblog/archives/2023/09/"><span class="card-archive-list-date">九月 2023</span><span class="card-archive-list-count">5</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/myblog/archives/2023/08/"><span class="card-archive-list-date">八月 2023</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/myblog/archives/2019/12/"><span class="card-archive-list-date">十二月 2019</span><span class="card-archive-list-count">11</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/myblog/archives/2019/11/"><span class="card-archive-list-date">十一月 2019</span><span class="card-archive-list-count">27</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/myblog/archives/2019/10/"><span class="card-archive-list-date">十月 2019</span><span class="card-archive-list-count">13</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">57</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2023-09-15T07:58:16.468Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2023 By brad 随风起舞</div><div class="framework-info"><span>框架 </span><a href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/myblog/js/utils.js"></script><script src="/myblog/js/main.js"></script><script src="/myblog/js/fancybox.umd.js"></script><div class="js-pjax"></div><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div class="no-result" id="local-search-results"></div><div id="local-search-stats-wrap"></div></div></div><div id="search-mask"></div><script src="/myblog/js/search/local-search.js"></script></div></div></body></html>